package com.wolf.system.service;

import com.wolf.vo.PageResult;
import com.wolf.provider.order.info.PageBean;
import com.wolf.provider.order.service.BaseService;
import com.wolf.system.model.SysUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Transactional
public interface ISysUserService extends BaseService<Long> {
    /**
     * 新增
     * @param model
     * @return
     */
    boolean addSysUser(SysUser model);

    /**
     * 修改
     * @param model
     * @return
     */
    boolean updateSysUser(SysUser model);

    /**
     * 删除
     * @param model
     * @return
     */
    boolean deleteSysUser(SysUser model);
    /**
     * 根据密码和用户名查询
     * @param userName
     * @param userPwd
     * @return
     */
    SysUser findSysUser(String userName, String userPwd);

    /**
     * 根据用户名查询
     * @param userName
     * @return
     */
    SysUser findSysUserByUserName(String userName);

    /**
     * 分页查询
     * @param model
     * @param pageBean
     * @return
     */
    public PageResult findByPage(SysUser model, PageBean pageBean);

    /**
     * 查询List 集合
     * @return
     */
    List<SysUser> findSysUserList();

    public SysUser getSessionSysUser();
}
